<?php

namespace Yolo\Components\Validator;

use ReflectionException;
use Yolo\ComponentManager\AbstractComponent;
use Yolo\Di\DI;
use Yolo\Di\Errors\CircularDependencyException;
use Yolo\Di\Errors\InvalidAttributeException;
use Yolo\Di\Errors\ParameterTypeEmptyException;

class ValidatorComponent extends AbstractComponent
{

    /**
     * Register the component.
     * @return void
     * @throws ReflectionException
     * @throws CircularDependencyException
     * @throws ParameterTypeEmptyException|InvalidAttributeException
     */
    public function register(): void
    {
        DI::bind(ValidatorInterface::class, Validator::class);
        DI::use(ValidatorFactory::class);
    }
}
